/*
 *    This file is part of CeluMap.
 *
 *    CeluMap is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU Lesser General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    CeluMap is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *    Copyright 2006, 2007, 2008 Gonzalo Merayo
 *    gonzalo (at) celumap.com.ar
 *    www.celumap.com.ar
 *
 */

package mapWriters;

import figures.cartography.Avenue;
import figures.cartography.Building;
import figures.cartography.Limit;
import figures.cartography.River;
import figures.cartography.SpeedWay;
import figures.cartography.Square;
import figures.cartography.Street;
import figures.cartography.Train;
import figures.cartography.Water;
import figures.images.PostOffice;
import figures.images.SubwayStation;

import indexWriters.NameIndexWriter;

import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;


public class DefaultMapWriter extends ConfigMapWriter {
	public DefaultMapWriter() {
		@SuppressWarnings("unused")
		Class[] a = {Water.class, River.class, Limit.class};
		Class[] b = {Avenue.class, SpeedWay.class};
		Class[] c = {Street.class, Train.class, Building.class, SubwayStation.class, PostOffice.class, Square.class};
		//addLayer(a, 0, Long.MAX_VALUE, false);
		addLayer(b, 0, Long.MAX_VALUE, false);
		addLayer(c, 5000, Long.MAX_VALUE, false);
//		Capa Light
		//addLayer(b, 0, 1000, true);
	}

	public void write(DataOutputStream os) throws IOException {
		super.write(os);
		NameIndexWriter.getInstance().write(new DataOutputStream(new FileOutputStream("index")));
	}

}
